function QuizEndAssistant(args) {
	/*
	 * this is the creator function for your scene assistant object. It will be
	 * passed all the additional parameters (after the scene name) that were
	 * passed to pushScene. The reference to the scene controller
	 * (this.controller) has not be established yet, so any initialization that
	 * needs the scene controller should be done in the setup function below.
	 */
	Mojo.Log.info("Quiz End Args: " + args);
	this.quizStats = args;
	// this.quizStats = {};
	// this.quizStats.qSize = 5;
	// this.quizStats.qAnswers = [];
	// this.quizStats.qTime = 10;

}

QuizEndAssistant.prototype.setup = function() {
	/*
	 * this function is for setup tasks that have to happen when the scene is
	 * first created
	 */

	/*
	 * use Mojo.View.render to render view templates and add them to the scene,
	 * if needed
	 */

	/* setup widgets here */

	/* add event handlers to listen to events from widgets */
	
	//Back Widget
	if(myApp.isTouchPad()){

		 var menuModel = {

		             visible: true,
		             items: [ 
		                    { icon: "back", command: "goBack"}
		             ]
		         }; 

		     this.controller.setupWidget(Mojo.Menu.commandMenu,
		         this.attributes = {
		             spacerHeight: 0,
		             menuClass: 'no-fade'
		         },
		         menuModel
		     );   

		}
	

	var cAnswers = 0;
	var iAnswers = 0;
	var answers = this.quizStats.qAnswers;
	Mojo.Log.info("Answer Length");
	for ( var i = 1; i < answers.length; i++) {
		answer = answers[i];
		Mojo.Log.info("Answer Value:" + answer);
		if (answer == "0"){
			Mojo.Log.info("in Incorrect");
			iAnswers++
		}else{
			Mojo.Log.info("in correct");
			cAnswers++
		}
			
	}
	
	$("qNum").innerHTML=this.quizStats.qSize;
	$("qCorrect").innerHTML=cAnswers;
	$("qPercent").innerHTML=Math.floor(cAnswers/this.quizStats.qSize*100);
	

};

QuizEndAssistant.prototype.activate = function(event) {
	/*
	 * put in event handlers here that should only be in effect when this scene
	 * is active. For example, key handlers that are observing the document
	 */
};

QuizEndAssistant.prototype.deactivate = function(event) {
	/*
	 * remove any event handlers you added in activate and do any other cleanup
	 * that should happen before this scene is popped or another scene is pushed
	 * on top
	 */
};

QuizEndAssistant.prototype.cleanup = function(event) {
	/*
	 * this function should do any cleanup needed before the scene is destroyed
	 * as a result of being popped off the scene stack
	 */
};
